package top.xiaoshuaila.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import top.xiaoshuaila.pojo.Menu;
import top.xiaoshuaila.service.IAdminService;
import top.xiaoshuaila.service.IMenuService;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小帅啦
 * @since 2021-05-01
 */
@RestController
@RequestMapping("/system/cfg")
@Api(tags = "菜单接口")
public class MenuController {

    @Autowired
    private IMenuService menuService;
    @ApiOperation("通过用户id查菜单列表")
    @GetMapping("/menu")
    public List<Menu>getMenusByAdminId(){
        return menuService.getMenusByAdminId();
    }
}
